package com.woniuxy.oldmanapi.mapper;

import com.woniuxy.oldmanapi.cvo.DeliveryDetailVo;
import com.woniuxy.oldmanapi.entity.DeliveryDetail;
import com.woniuxy.oldmanapi.entity.DeliveryMedicineBill;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.Date;
import java.util.List;

@Repository
public interface DeliveryDetailMapper extends Mapper<DeliveryDetail> {
    List<DeliveryDetailVo> selectByCons(@Param("begin") Date begin, @Param("end") Date end, @Param("olderId") int olderId);

    List<DeliveryDetailVo> selectByDid(int id);

    void insetDetailsOfDetail(@Param("createtime") Date createtime,@Param("orderid") int orderid, @Param("list") List<DeliveryDetailVo> list);

    @Delete("delete from delivery_detail where delivery_id=#{deliveryId}")
    void deleteByDid(int deliveryId);
}
